package Util::FaHuoUniversity::FaHuoUniversity;
use Moose;
use namespace::autoclean;
use JSON;
use Time::Piece;

has 'schema' => (
	is => 'rw',
	required => 1,
	isa => 'DBIx::Class::Schema',
);

#####################################################
#Input: 
#	tuan_id
#Return: 
#	fahuos	
#####################################################
sub fahuo_univ_search {
	my ($self, $fahuo_id) = @_;

	return $self->schema->resultset('FaHuoUniversity')->search({fahuo_id => $fahuo_id }, {});

}

#####################################################
#Input: 
#	tuan_id
#	fahuo_time	
#	fahuo_address	
#	fahuo_count	
#####################################################
sub add_to_fahuo_university {
	my ($self, $fahuo_id, $university_id, $user_id) = @_;

	my $fahuo = $self->schema->resultset('FaHuoUniversity')->create({
			fahuo_id => $fahuo_id,
			university_id => $university_id,
			created_by => $user_id,
			updated_by => $user_id,
			});
}

__PACKAGE__->meta->make_immutable;

1;
